<template>
  <router-link tag="li" :to='{
    path:"/SongItem",
    name:"SongItem",
    query:{
      item:JSON.stringify(item)
    }
  }' class="item">
    <img :src="item.picUrl" />
    <div class="playnum">
      <p>{{item.playCount|formatNum}}</p>
    </div>
    <h6>{{item.name}}</h6>
  </router-link >
</template>

<script>
export default {
  props: {
    item: Object,
  },
  filters: {
    formatNum(value) {
      return (value / 10000).toFixed(1) + "万";
    },
  },
};
</script>

<style lang='less' scoped>
p,
h6 {
  margin: 0;
}
.item {
  width: 32%;
  position: relative;
  margin-bottom: 16px;
  background-color: #ffff;
  border-radius: 10px 10px 5px 5px;
  border: 1px solid #ebebeb;
  padding: 0px 0px 6px 0px;
  img {
    width: 100%;
    border-radius: 10px 10px 0px 0px;
  }
  .playnum{
    background-color: rgba(0, 0, 0,0.25);
    position: absolute;
    right: 5px;
    top: 2px;
    z-index: 3;
    padding: 2px 5px;
    border-radius: 15px;
  }
  p {
   
    padding-left: 15px;
    color: #fff;
    font-size: 12px;
    background-position: 0;
    background-repeat: no-repeat;
    // width: 30px;
    height: 15px;
    // background-size: 11px 10px;
    text-shadow: 1px 0 0 rgb(0, 0, 0);
    background: url()
      no-repeat left;
    background-size: 12px;
  }

  h6 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 2px 2px 0 6px;
    line-height: 1.2;
    font-size: 0.6rem;
    font-weight: 400;

    color: #a5a1a1;
  }
}
</style>